<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<link type="text/css" href="plug-in/Validform/css/metrole/style.css" rel="stylesheet">
<link type="text/css" href="plug-in/Validform/css/metrole/tablefrom.css" rel="stylesheet">
<script src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js" type="text/javascript"></script>
<script src="plug-in/Validform/js/Validform_Datatype_zh-cn.js" type="text/javascript"></script>
<script src="plug-in/Validform/js/datatype_zh-cn.js" type="text/javascript"></script>
<script src="plug-in/Validform/plugin/passwordStrength/passwordStrength-min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		var shopid='${shopid}';
		var shopName='${shopname}';
		var cardNos='${cardNos}';
		var productname='${productname}';
		var productid='${productid}';
		$("#function-panel").panel(
				{
					title :"选择商品",
					href:"mallShopCardruleController.do?productviewedit&shopid="+shopid
						+"&cardlist="+cardNos
						+"&productid="+productid
				}
		);
	});
	var mallShopCardruleShopModule = (function(){

		var module = {
			init :function(){

			},
			shopclick:function(rowIndex, rowData){
				var shopid = rowData.id;
				var shopName = rowData.shopname;
				var cardNos = $("#cardNos").val();
				var productid = $("#product_id").val();
				$("#function-panel").panel(
						{
							title :"选择商品",
							href:"mallShopCardruleController.do?productviewedit&shopid="+shopid+"&cardlist="+cardNos+"&productid="+productid
						}
				);
			},
			rowclick:function(rowIndex, rowData){
				var productId = rowData.id;
				var productName = rowData.productname;
				$("#product_id").val(productId);
				$("#product_name").text(productName);
			}
		}
		return module;
	})();
</script>
<div class="easyui-layout" fit="true">
	<input type="hidden" value="${cardNos}" id="cardNos">
	<div region="center" style="padding:0px;border:0px">
		<t:datagrid name="mallShopCardruleAddList"   title="油卡卡号维护" actionUrl="mallShopCardruleController.do?mallshopdatagrid" idField="id" fit="true"
					onClick="mallShopCardruleShopModule.shopclick"	queryMode="group">
			<t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
			<t:dgCol title="店铺名称" field="shopname"  query="true"  width="120"></t:dgCol>
			<t:dgCol title="组织机构代码" field="organizationcode"   width="120"></t:dgCol>
			<t:dgCol title="手机号码" field="phonenumber"   width="120"></t:dgCol>
			<t:dgCol title="联系地址" field="contactaddress"   width="120"></t:dgCol>
			<t:dgCol title="创建时间" field="createtime" formatter="yyyy-MM-dd hh:mm:ss"  width="120"></t:dgCol>
			<%-- <t:dgToolBar title="编辑" icon="icon-edit" url="mallShopCardruleController.do?addorupdate" funname="update"></t:dgToolBar>
               <t:dgToolBar title="查看" icon="icon-search" url="mallShopCardruleController.do?addorupdate" funname="detail"></t:dgToolBar>--%>
		</t:datagrid>
	</div>
</div>

<div region="east" style="width: 700px;" split="true">
	<div  region="north"  split="true"  class="easyui-panel"  style="padding-top: -100px;height: 10px" fit="true" border="false" id="function-panel">

	</div>

</div>


